{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>happiness</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>county</th>\n",
       "      <th>survey_time</th>\n",
       "      <th>gender</th>\n",
       "      <th>birth</th>\n",
       "      <th>nationality</th>\n",
       "      <th>...</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>house</th>\n",
       "      <th>car</th>\n",
       "      <th>marital</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>view</th>\n",
       "      <th>inc_ability</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>32</td>\n",
       "      <td>59</td>\n",
       "      <td>2015/8/4 14:18</td>\n",
       "      <td>1</td>\n",
       "      <td>1959</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>60000.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>18</td>\n",
       "      <td>52</td>\n",
       "      <td>85</td>\n",
       "      <td>2015/7/21 15:04</td>\n",
       "      <td>1</td>\n",
       "      <td>1992</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>40000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>29</td>\n",
       "      <td>83</td>\n",
       "      <td>126</td>\n",
       "      <td>2015/7/21 13:24</td>\n",
       "      <td>2</td>\n",
       "      <td>1967</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>8000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3 rows × 42 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  happiness  survey_type  province  city  county      survey_time  \\\n",
       "0   1          4            1        12    32      59   2015/8/4 14:18   \n",
       "1   2          4            2        18    52      85  2015/7/21 15:04   \n",
       "2   3          4            2        29    83     126  2015/7/21 13:24   \n",
       "\n",
       "   gender  birth  nationality     ...       family_income  family_m  \\\n",
       "0       1   1959            1     ...             60000.0         2   \n",
       "1       1   1992            1     ...             40000.0         3   \n",
       "2       2   1967            1     ...              8000.0         3   \n",
       "\n",
       "   family_status  house  car  marital  status_peer  status_3_before  view  \\\n",
       "0              2      1    2        3            3                2     4   \n",
       "1              4      1    2        1            1                1     4   \n",
       "2              3      1    2        3            2                1     4   \n",
       "\n",
       "   inc_ability  \n",
       "0            3  \n",
       "1            2  \n",
       "2            2  \n",
       "\n",
       "[3 rows x 42 columns]"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd \n",
    "import numpy as np \n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "data_train = pd.read_csv('happiness_train_abbr.csv')\n",
    "data_train.head()[:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 8000 entries, 0 to 7999\n",
      "Data columns (total 42 columns):\n",
      "id                 8000 non-null int64\n",
      "happiness          8000 non-null int64\n",
      "survey_type        8000 non-null int64\n",
      "province           8000 non-null int64\n",
      "city               8000 non-null int64\n",
      "county             8000 non-null int64\n",
      "survey_time        8000 non-null object\n",
      "gender             8000 non-null int64\n",
      "birth              8000 non-null int64\n",
      "nationality        8000 non-null int64\n",
      "religion           8000 non-null int64\n",
      "religion_freq      8000 non-null int64\n",
      "edu                8000 non-null int64\n",
      "income             8000 non-null int64\n",
      "political          8000 non-null int64\n",
      "floor_area         8000 non-null float64\n",
      "height_cm          8000 non-null int64\n",
      "weight_jin         8000 non-null int64\n",
      "health             8000 non-null int64\n",
      "health_problem     8000 non-null int64\n",
      "depression         8000 non-null int64\n",
      "hukou              8000 non-null int64\n",
      "socialize          8000 non-null int64\n",
      "relax              8000 non-null int64\n",
      "learn              8000 non-null int64\n",
      "equity             8000 non-null int64\n",
      "class              8000 non-null int64\n",
      "work_exper         8000 non-null int64\n",
      "work_status        2951 non-null float64\n",
      "work_yr            2951 non-null float64\n",
      "work_type          2951 non-null float64\n",
      "work_manage        2951 non-null float64\n",
      "family_income      7999 non-null float64\n",
      "family_m           8000 non-null int64\n",
      "family_status      8000 non-null int64\n",
      "house              8000 non-null int64\n",
      "car                8000 non-null int64\n",
      "marital            8000 non-null int64\n",
      "status_peer        8000 non-null int64\n",
      "status_3_before    8000 non-null int64\n",
      "view               8000 non-null int64\n",
      "inc_ability        8000 non-null int64\n",
      "dtypes: float64(6), int64(35), object(1)\n",
      "memory usage: 2.6+ MB\n"
     ]
    }
   ],
   "source": [
    "data_train.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>happiness</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>county</th>\n",
       "      <th>gender</th>\n",
       "      <th>birth</th>\n",
       "      <th>nationality</th>\n",
       "      <th>religion</th>\n",
       "      <th>...</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>house</th>\n",
       "      <th>car</th>\n",
       "      <th>marital</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>view</th>\n",
       "      <th>inc_ability</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>7.999000e+03</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>4000.50000</td>\n",
       "      <td>3.850125</td>\n",
       "      <td>1.405500</td>\n",
       "      <td>15.155375</td>\n",
       "      <td>42.564750</td>\n",
       "      <td>70.619000</td>\n",
       "      <td>1.53000</td>\n",
       "      <td>1964.707625</td>\n",
       "      <td>1.37350</td>\n",
       "      <td>0.772250</td>\n",
       "      <td>...</td>\n",
       "      <td>6.776050e+04</td>\n",
       "      <td>2.882500</td>\n",
       "      <td>2.595875</td>\n",
       "      <td>1.063625</td>\n",
       "      <td>1.817125</td>\n",
       "      <td>3.234375</td>\n",
       "      <td>2.226125</td>\n",
       "      <td>1.702500</td>\n",
       "      <td>3.30350</td>\n",
       "      <td>1.094875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>2309.54541</td>\n",
       "      <td>0.938228</td>\n",
       "      <td>0.491019</td>\n",
       "      <td>8.917100</td>\n",
       "      <td>27.187404</td>\n",
       "      <td>38.747503</td>\n",
       "      <td>0.49913</td>\n",
       "      <td>16.842865</td>\n",
       "      <td>1.52882</td>\n",
       "      <td>1.071459</td>\n",
       "      <td>...</td>\n",
       "      <td>2.909591e+05</td>\n",
       "      <td>1.521835</td>\n",
       "      <td>1.077011</td>\n",
       "      <td>0.789402</td>\n",
       "      <td>0.511825</td>\n",
       "      <td>1.423182</td>\n",
       "      <td>0.971525</td>\n",
       "      <td>0.976147</td>\n",
       "      <td>1.98132</td>\n",
       "      <td>3.410180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1921.000000</td>\n",
       "      <td>-8.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>2000.75000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>37.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1952.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>1.300000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.00000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>4000.50000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>42.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>1965.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>3.800000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.00000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>6000.25000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>104.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>1977.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>7.000000e+04</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.00000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>8000.00000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>134.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>1997.000000</td>\n",
       "      <td>8.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>9.999992e+06</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>30.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>5.00000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8 rows × 41 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               id    happiness  survey_type     province         city  \\\n",
       "count  8000.00000  8000.000000  8000.000000  8000.000000  8000.000000   \n",
       "mean   4000.50000     3.850125     1.405500    15.155375    42.564750   \n",
       "std    2309.54541     0.938228     0.491019     8.917100    27.187404   \n",
       "min       1.00000    -8.000000     1.000000     1.000000     1.000000   \n",
       "25%    2000.75000     4.000000     1.000000     7.000000    18.000000   \n",
       "50%    4000.50000     4.000000     1.000000    15.000000    42.000000   \n",
       "75%    6000.25000     4.000000     2.000000    22.000000    65.000000   \n",
       "max    8000.00000     5.000000     2.000000    31.000000    89.000000   \n",
       "\n",
       "            county      gender        birth  nationality     religion  \\\n",
       "count  8000.000000  8000.00000  8000.000000   8000.00000  8000.000000   \n",
       "mean     70.619000     1.53000  1964.707625      1.37350     0.772250   \n",
       "std      38.747503     0.49913    16.842865      1.52882     1.071459   \n",
       "min       1.000000     1.00000  1921.000000     -8.00000    -8.000000   \n",
       "25%      37.000000     1.00000  1952.000000      1.00000     1.000000   \n",
       "50%      73.000000     2.00000  1965.000000      1.00000     1.000000   \n",
       "75%     104.000000     2.00000  1977.000000      1.00000     1.000000   \n",
       "max     134.000000     2.00000  1997.000000      8.00000     1.000000   \n",
       "\n",
       "          ...       family_income     family_m  family_status        house  \\\n",
       "count     ...        7.999000e+03  8000.000000    8000.000000  8000.000000   \n",
       "mean      ...        6.776050e+04     2.882500       2.595875     1.063625   \n",
       "std       ...        2.909591e+05     1.521835       1.077011     0.789402   \n",
       "min       ...       -3.000000e+00    -3.000000      -8.000000    -3.000000   \n",
       "25%       ...        1.300000e+04     2.000000       2.000000     1.000000   \n",
       "50%       ...        3.800000e+04     3.000000       3.000000     1.000000   \n",
       "75%       ...        7.000000e+04     4.000000       3.000000     1.000000   \n",
       "max       ...        9.999992e+06    50.000000       5.000000    30.000000   \n",
       "\n",
       "               car      marital  status_peer  status_3_before        view  \\\n",
       "count  8000.000000  8000.000000  8000.000000      8000.000000  8000.00000   \n",
       "mean      1.817125     3.234375     2.226125         1.702500     3.30350   \n",
       "std       0.511825     1.423182     0.971525         0.976147     1.98132   \n",
       "min      -8.000000     1.000000    -8.000000        -8.000000    -8.00000   \n",
       "25%       2.000000     3.000000     2.000000         1.000000     3.00000   \n",
       "50%       2.000000     3.000000     2.000000         2.000000     4.00000   \n",
       "75%       2.000000     3.000000     3.000000         2.000000     4.00000   \n",
       "max       2.000000     7.000000     3.000000         3.000000     5.00000   \n",
       "\n",
       "       inc_ability  \n",
       "count  8000.000000  \n",
       "mean      1.094875  \n",
       "std       3.410180  \n",
       "min      -8.000000  \n",
       "25%       2.000000  \n",
       "50%       2.000000  \n",
       "75%       3.000000  \n",
       "max       4.000000  \n",
       "\n",
       "[8 rows x 41 columns]"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_train.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_train['family_income'] = data_train['family_income'].fillna(data_train['family_income'].mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 8000 entries, 0 to 7999\n",
      "Data columns (total 42 columns):\n",
      "id                 8000 non-null int64\n",
      "happiness          8000 non-null int64\n",
      "survey_type        8000 non-null int64\n",
      "province           8000 non-null int64\n",
      "city               8000 non-null int64\n",
      "county             8000 non-null int64\n",
      "survey_time        8000 non-null object\n",
      "gender             8000 non-null int64\n",
      "birth              8000 non-null int64\n",
      "nationality        8000 non-null int64\n",
      "religion           8000 non-null int64\n",
      "religion_freq      8000 non-null int64\n",
      "edu                8000 non-null int64\n",
      "income             8000 non-null int64\n",
      "political          8000 non-null int64\n",
      "floor_area         8000 non-null float64\n",
      "height_cm          8000 non-null int64\n",
      "weight_jin         8000 non-null int64\n",
      "health             8000 non-null int64\n",
      "health_problem     8000 non-null int64\n",
      "depression         8000 non-null int64\n",
      "hukou              8000 non-null int64\n",
      "socialize          8000 non-null int64\n",
      "relax              8000 non-null int64\n",
      "learn              8000 non-null int64\n",
      "equity             8000 non-null int64\n",
      "class              8000 non-null int64\n",
      "work_exper         8000 non-null int64\n",
      "work_status        2951 non-null float64\n",
      "work_yr            2951 non-null float64\n",
      "work_type          2951 non-null float64\n",
      "work_manage        2951 non-null float64\n",
      "family_income      8000 non-null float64\n",
      "family_m           8000 non-null int64\n",
      "family_status      8000 non-null int64\n",
      "house              8000 non-null int64\n",
      "car                8000 non-null int64\n",
      "marital            8000 non-null int64\n",
      "status_peer        8000 non-null int64\n",
      "status_3_before    8000 non-null int64\n",
      "view               8000 non-null int64\n",
      "inc_ability        8000 non-null int64\n",
      "dtypes: float64(6), int64(35), object(1)\n",
      "memory usage: 2.6+ MB\n"
     ]
    }
   ],
   "source": [
    "data_train.info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 线性回归（特征未处理）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.linear_model import LinearRegression \n",
    "from sklearn.cross_validation import KFold \n",
    "\n",
    "predictors = ['survey_type', 'province', 'city', 'gender', 'birth', 'nationality', 'religion', 'religion_freq', 'edu',\n",
    "             'income', 'political', 'floor_area', 'height_cm', 'weight_jin', 'health', 'health_problem', 'depression',\n",
    "             'hukou', 'socialize', 'relax', 'learn', 'equity', 'class', #'work_exper', 'work_status', 'work_yr', 'work_type', 'work_manage', \n",
    "             'family_income', 'family_m', 'family_status', 'house', 'car', 'marital', 'status_peer',\n",
    "             'status_3_before', 'view', 'inc_ability']\n",
    "alg = LinearRegression()\n",
    "kf = KFold(data_train.shape[0], shuffle=False, random_state=1)\n",
    "\n",
    "predictions = []\n",
    "for train, test in kf:\n",
    "    train_predictors = data_train[predictors].iloc[train, :]\n",
    "    train_target = data_train['happiness'].iloc[train]\n",
    "    alg.fit(train_predictors, train_target)\n",
    "    test_predictions = alg.predict(data_train[predictors].iloc[test, :])\n",
    "    predictions.append(test_predictions)\n",
    "#     print(data_train['happiness'].iloc[train] - test_predictions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.588"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# sum((np.around(predictions) - predictions)**2)/8000\n",
    "predictions = np.concatenate(predictions)\n",
    "sum(np.around(predictions) == data_train['happiness']) / len(data_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 拟合测试数据集，修改提交文件"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_test = pd.read_csv('happiness_test_abbr.csv')\n",
    "\n",
    "test_prediction = np.around(alg.predict(data_test[predictors]))\n",
    "test_prediction\n",
    "\n",
    "submit = pd.read_csv('happiness_submit.csv')\n",
    "submit['happiness'] = test_prediction\n",
    "submit.to_csv('happiness_submit.csv', index=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 随机森林（特征未处理）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4, 4, 4, ..., 4, 4, 4], dtype=int64)"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn import model_selection \n",
    "from sklearn.ensemble import RandomForestClassifier \n",
    "from sklearn import tree\n",
    "\n",
    "predictors = ['survey_type', 'province', 'city', 'gender', 'birth', 'nationality', 'religion', 'religion_freq', 'edu',\n",
    "             'income', 'political', 'floor_area', 'height_cm', 'weight_jin', 'health', 'health_problem', 'depression',\n",
    "             'hukou', 'socialize', 'relax', 'learn', 'equity', 'class', #'work_exper', 'work_status', 'work_yr', 'work_type', 'work_manage', \n",
    "             'family_income', 'family_m', 'family_status', 'house', 'car', 'marital', 'status_peer',\n",
    "             'status_3_before', 'view', 'inc_ability' ]\n",
    "clf = RandomForestClassifier(n_estimators=10)\n",
    "clf.fit(data_train[predictors][:6000], data_train['happiness'][:6000])\n",
    "predictions = clf.predict(data_train[predictors][6000:])\n",
    "predictions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.594"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum(predictions == data_train['happiness'][6000:])/len(predictions)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 线性回归（特征未处理）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.602"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LinearRegression \n",
    "\n",
    "lr = LinearRegression()\n",
    "lr.fit(data_train[predictors][:6000], data_train['happiness'][:6000])\n",
    "lr_predictions = lr.predict(data_train[predictors][6000:])\n",
    "lr_predictions\n",
    "\n",
    "sum(np.around(lr_predictions) == data_train['happiness'][6000:])/len(lr_predictions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>happiness</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>county</th>\n",
       "      <th>gender</th>\n",
       "      <th>birth</th>\n",
       "      <th>nationality</th>\n",
       "      <th>religion</th>\n",
       "      <th>...</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>house</th>\n",
       "      <th>car</th>\n",
       "      <th>marital</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>view</th>\n",
       "      <th>inc_ability</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>8.000000e+03</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.000000</td>\n",
       "      <td>8000.00000</td>\n",
       "      <td>8000.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>4000.50000</td>\n",
       "      <td>3.850125</td>\n",
       "      <td>1.405500</td>\n",
       "      <td>15.155375</td>\n",
       "      <td>42.564750</td>\n",
       "      <td>70.619000</td>\n",
       "      <td>1.53000</td>\n",
       "      <td>1964.707625</td>\n",
       "      <td>1.37350</td>\n",
       "      <td>0.772250</td>\n",
       "      <td>...</td>\n",
       "      <td>6.776050e+04</td>\n",
       "      <td>2.882500</td>\n",
       "      <td>2.595875</td>\n",
       "      <td>1.063625</td>\n",
       "      <td>1.817125</td>\n",
       "      <td>3.234375</td>\n",
       "      <td>2.226125</td>\n",
       "      <td>1.702500</td>\n",
       "      <td>3.30350</td>\n",
       "      <td>1.094875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>2309.54541</td>\n",
       "      <td>0.938228</td>\n",
       "      <td>0.491019</td>\n",
       "      <td>8.917100</td>\n",
       "      <td>27.187404</td>\n",
       "      <td>38.747503</td>\n",
       "      <td>0.49913</td>\n",
       "      <td>16.842865</td>\n",
       "      <td>1.52882</td>\n",
       "      <td>1.071459</td>\n",
       "      <td>...</td>\n",
       "      <td>2.909409e+05</td>\n",
       "      <td>1.521835</td>\n",
       "      <td>1.077011</td>\n",
       "      <td>0.789402</td>\n",
       "      <td>0.511825</td>\n",
       "      <td>1.423182</td>\n",
       "      <td>0.971525</td>\n",
       "      <td>0.976147</td>\n",
       "      <td>1.98132</td>\n",
       "      <td>3.410180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1921.000000</td>\n",
       "      <td>-8.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>2000.75000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>37.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1952.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>1.300000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.00000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>4000.50000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>42.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>1965.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>3.800000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.00000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>6000.25000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>104.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>1977.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>7.000000e+04</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.00000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>8000.00000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>134.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>1997.000000</td>\n",
       "      <td>8.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>9.999992e+06</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>30.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>5.00000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8 rows × 41 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               id    happiness  survey_type     province         city  \\\n",
       "count  8000.00000  8000.000000  8000.000000  8000.000000  8000.000000   \n",
       "mean   4000.50000     3.850125     1.405500    15.155375    42.564750   \n",
       "std    2309.54541     0.938228     0.491019     8.917100    27.187404   \n",
       "min       1.00000    -8.000000     1.000000     1.000000     1.000000   \n",
       "25%    2000.75000     4.000000     1.000000     7.000000    18.000000   \n",
       "50%    4000.50000     4.000000     1.000000    15.000000    42.000000   \n",
       "75%    6000.25000     4.000000     2.000000    22.000000    65.000000   \n",
       "max    8000.00000     5.000000     2.000000    31.000000    89.000000   \n",
       "\n",
       "            county      gender        birth  nationality     religion  \\\n",
       "count  8000.000000  8000.00000  8000.000000   8000.00000  8000.000000   \n",
       "mean     70.619000     1.53000  1964.707625      1.37350     0.772250   \n",
       "std      38.747503     0.49913    16.842865      1.52882     1.071459   \n",
       "min       1.000000     1.00000  1921.000000     -8.00000    -8.000000   \n",
       "25%      37.000000     1.00000  1952.000000      1.00000     1.000000   \n",
       "50%      73.000000     2.00000  1965.000000      1.00000     1.000000   \n",
       "75%     104.000000     2.00000  1977.000000      1.00000     1.000000   \n",
       "max     134.000000     2.00000  1997.000000      8.00000     1.000000   \n",
       "\n",
       "          ...       family_income     family_m  family_status        house  \\\n",
       "count     ...        8.000000e+03  8000.000000    8000.000000  8000.000000   \n",
       "mean      ...        6.776050e+04     2.882500       2.595875     1.063625   \n",
       "std       ...        2.909409e+05     1.521835       1.077011     0.789402   \n",
       "min       ...       -3.000000e+00    -3.000000      -8.000000    -3.000000   \n",
       "25%       ...        1.300000e+04     2.000000       2.000000     1.000000   \n",
       "50%       ...        3.800000e+04     3.000000       3.000000     1.000000   \n",
       "75%       ...        7.000000e+04     4.000000       3.000000     1.000000   \n",
       "max       ...        9.999992e+06    50.000000       5.000000    30.000000   \n",
       "\n",
       "               car      marital  status_peer  status_3_before        view  \\\n",
       "count  8000.000000  8000.000000  8000.000000      8000.000000  8000.00000   \n",
       "mean      1.817125     3.234375     2.226125         1.702500     3.30350   \n",
       "std       0.511825     1.423182     0.971525         0.976147     1.98132   \n",
       "min      -8.000000     1.000000    -8.000000        -8.000000    -8.00000   \n",
       "25%       2.000000     3.000000     2.000000         1.000000     3.00000   \n",
       "50%       2.000000     3.000000     2.000000         2.000000     4.00000   \n",
       "75%       2.000000     3.000000     3.000000         2.000000     4.00000   \n",
       "max       2.000000     7.000000     3.000000         3.000000     5.00000   \n",
       "\n",
       "       inc_ability  \n",
       "count  8000.000000  \n",
       "mean      1.094875  \n",
       "std       3.410180  \n",
       "min      -8.000000  \n",
       "25%       2.000000  \n",
       "50%       2.000000  \n",
       "75%       3.000000  \n",
       "max       4.000000  \n",
       "\n",
       "[8 rows x 41 columns]"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_train.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 特征处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_train.loc[data_train['happiness'] <0 , 'happiness'] = data_train['happiness'].median()\n",
    "\n",
    "data_train.loc[data_train['inc_ability'] <0 , 'inc_ability'] = data_train['inc_ability'].median()\n",
    "\n",
    "data_train.loc[data_train['view'] <0 , 'view'] = data_train['view'].median()\n",
    "\n",
    "data_train.loc[data_train['status_peer'] < 0, 'status_peer'] = 3\n",
    "# data_train.groupby(['status_peer', 'happiness'])['happiness'].count()\n",
    "\n",
    "data_train.loc[data_train['status_3_before'] <0 , 'status_3_before'] = 3\n",
    "\n",
    "data_train.loc[data_train['car'] <0, 'car'] = 1 \n",
    "\n",
    "data_train.loc[data_train['house'] <0, 'house'] = data_train['house'].median()\n",
    "\n",
    "data_train['family_income'].value_counts()\n",
    "arr = pd.cut(data_train['family_income'], [-10,1000, 3000, 6000, 10000, 15000, 20000, 30000, 50000, 100000, 1000000, 1000000000], \n",
    "             labels=[1,2,3,4,5,6,7,8,9,10,11])\n",
    "data_train['family_income_10'] = arr\n",
    "\n",
    "data_train.loc[data_train['class'] == -8, 'class'] = data_train['class'].median()\n",
    "\n",
    "data_train.loc[data_train['equity'] == -8, 'equity'] = data_train['equity'].median()\n",
    "\n",
    "data_train.loc[data_train['learn'] == -8, 'learn'] = data_train['learn'].median()\n",
    "\n",
    "data_train.loc[data_train['relax'] == -8, 'relax'] = data_train['relax'].median()\n",
    "\n",
    "data_train.loc[data_train['socialize'] == -8, 'socialize'] = data_train['socialize'].median()\n",
    "\n",
    "data_train.loc[data_train['depression'] == -8, 'depression'] = data_train['depression'].median()\n",
    "\n",
    "data_train.loc[data_train['health'] == -8, 'health'] = data_train['health'].median()\n",
    "\n",
    "data_train.loc[data_train['health_problem'] == -8, 'health_problem'] = data_train['health_problem'].median()\n",
    "\n",
    "arr = pd.cut(data_train['weight_jin'], [0,100,110,120,130,140,150,160,180,200,300],\n",
    "            labels=[1,2,3,4,5,6,7,8,9,10])\n",
    "# arr.value_counts()\n",
    "data_train['weight_jin_10'] = arr\n",
    "\n",
    "arr = pd.cut(data_train['height_cm'], [-100,120,140,150,160,165,170,175,180,300],\n",
    "            labels=[1,2,3,4,5,6,7,8,9])\n",
    "# arr.value_counts()\n",
    "data_train['height_cm_10'] = arr\n",
    "\n",
    "# data_train['floor_area'].value_counts()\n",
    "arr = pd.cut(data_train['floor_area'], [0, 10, 30, 50, 80, 100, 150, 200, 500, 1000, 1500],\n",
    "            labels=[1,2,3,4,5,6,7,8,9,10])\n",
    "# arr.value_counts()\n",
    "data_train['floor_area_10'] = arr\n",
    "\n",
    "data_train.loc[data_train['political'] == -8, 'political'] = data_train['political'].median()\n",
    "\n",
    "data_train['income'].value_counts()\n",
    "arr = pd.cut(data_train['income'], [-10,1000, 3000, 6000, 10000, 15000, 20000, 30000, 50000, 100000, 1000000, 10000000], \n",
    "             labels=[1,2,3,4,5,6,7,8,9,10,11], )\n",
    "data_train['income_10'] = arr\n",
    "\n",
    "data_train.loc[data_train['edu']==-8, 'edu'] = data_train['edu'].median()\n",
    "\n",
    "data_train.loc[data_train['religion_freq'] == -8, 'religion_freq'] = 1\n",
    "\n",
    "data_train.loc[data_train['religion'] == -8, 'religion'] = 0\n",
    "\n",
    "data_train.loc[data_train['nationality'] == -8, 'nationality'] = 8\n",
    "\n",
    "data_train.loc[data_train['happiness'] == -8, 'happiness'] = 1\n",
    "\n",
    "data_train.loc[data_train['family_m'] <0 , 'family_m'] = 1\n",
    "\n",
    "data_train.loc[data_train['family_status'] <0 , 'family_status'] = data_train['family_status'].median()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 8000 entries, 0 to 7999\n",
      "Data columns (total 47 columns):\n",
      "id                  8000 non-null int64\n",
      "happiness           8000 non-null float64\n",
      "survey_type         8000 non-null int64\n",
      "province            8000 non-null int64\n",
      "city                8000 non-null int64\n",
      "county              8000 non-null int64\n",
      "survey_time         8000 non-null object\n",
      "gender              8000 non-null int64\n",
      "birth               8000 non-null int64\n",
      "nationality         8000 non-null int64\n",
      "religion            8000 non-null int64\n",
      "religion_freq       8000 non-null int64\n",
      "edu                 8000 non-null float64\n",
      "income              8000 non-null int64\n",
      "political           8000 non-null float64\n",
      "floor_area          8000 non-null float64\n",
      "height_cm           8000 non-null int64\n",
      "weight_jin          8000 non-null int64\n",
      "health              8000 non-null float64\n",
      "health_problem      8000 non-null float64\n",
      "depression          8000 non-null float64\n",
      "hukou               8000 non-null int64\n",
      "socialize           8000 non-null float64\n",
      "relax               8000 non-null float64\n",
      "learn               8000 non-null float64\n",
      "equity              8000 non-null float64\n",
      "class               8000 non-null float64\n",
      "work_exper          8000 non-null int64\n",
      "work_status         2951 non-null float64\n",
      "work_yr             2951 non-null float64\n",
      "work_type           2951 non-null float64\n",
      "work_manage         2951 non-null float64\n",
      "family_income       8000 non-null float64\n",
      "family_m            8000 non-null int64\n",
      "family_status       8000 non-null float64\n",
      "house               8000 non-null float64\n",
      "car                 8000 non-null int64\n",
      "marital             8000 non-null int64\n",
      "status_peer         8000 non-null int64\n",
      "status_3_before     8000 non-null int64\n",
      "view                8000 non-null float64\n",
      "inc_ability         8000 non-null float64\n",
      "family_income_10    8000 non-null int32\n",
      "weight_jin_10       8000 non-null int32\n",
      "height_cm_10        8000 non-null int32\n",
      "floor_area_10       8000 non-null int32\n",
      "income_10           8000 non-null int32\n",
      "dtypes: float64(21), int32(5), int64(20), object(1)\n",
      "memory usage: 2.7+ MB\n"
     ]
    }
   ],
   "source": [
    "data_train['height_cm_10'] = data_train['height_cm_10'].astype(int)\n",
    "data_train['income_10'] = data_train['income_10'].astype(int)\n",
    "data_train['family_income_10'] = data_train['family_income_10'].astype(int)\n",
    "data_train['weight_jin_10'] = data_train['weight_jin_10'].astype(int)\n",
    "data_train['floor_area_10'] = data_train['floor_area_10'].astype(int)\n",
    "data_train.info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 决策树"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4., 4., 2., ..., 4., 4., 4.])"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn import model_selection \n",
    "from sklearn.ensemble import RandomForestClassifier \n",
    "from sklearn import tree\n",
    "\n",
    "predictors = ['survey_type', 'province', 'city', 'gender', 'birth', 'nationality', 'religion', 'religion_freq', 'edu',\n",
    "             'income_10', 'political', 'floor_area_10', 'height_cm_10', 'weight_jin_10', 'health', 'health_problem', 'depression',\n",
    "             'hukou', 'socialize', 'relax', 'learn', 'equity', 'class', #'work_exper', 'work_status', 'work_yr', 'work_type', 'work_manage', \n",
    "             'family_income_10', 'family_m', 'family_status', 'house', 'car', 'marital', 'status_peer',\n",
    "             'status_3_before', 'view', 'inc_ability']\n",
    "clf = RandomForestClassifier(n_estimators=10)\n",
    "clf.fit(data_train[predictors][:6000], data_train['happiness'][:6000])\n",
    "predictions = clf.predict(data_train[predictors][6000:])\n",
    "predictions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.585"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum(predictions == data_train['happiness'][6000:])/len(predictions)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 随机森林"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.614  0.623  0.6225 0.6175]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.6192500000000001"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn import cross_validation \n",
    "from sklearn.ensemble import RandomForestClassifier \n",
    "\n",
    "rfc = RandomForestClassifier(random_state=1, n_estimators=10, min_samples_split=45, min_samples_leaf=2)\n",
    "kf = cross_validation.KFold(data_train.shape[0], n_folds=4, random_state=1)\n",
    "predictions = cross_validation.cross_val_score(rfc, data_train[predictors], data_train['happiness'], cv=kf)\n",
    "print(predictions)\n",
    "predictions.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "31736.0"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rfc.fit(data_train[predictors], data_train['happiness'])\n",
    "sum(rfc.predict(data_train[predictors][:]))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征重要性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABBgAAAF8CAYAAABlvAiCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzs3Xe4JFWZ+PHvOzMwxGGQGYKkQQGJkkaCipIRiasiKJJEEQUFkWgCEXEMJBFRBAQUQUAUF1BWERR0ATGvYmAVFd2fYsKwqytyfn+8p/cWzYR7b3W4M/P9PE8/t7u6b9Wp7qpT57wnVJRSkCRJkiRJamPSsBMgSZIkSZIWfgYYJEmSJElSawYYJEmSJElSawYYJEmSJElSawYYJEmSJElSawYYJEmSJElSawYYJEmSJElSawYYJEmSJElSawYYJEmSJElSa1OGnQCAGTNmlFmzZg07GZIkSZIkqeHrX//6b0spM0fz2QkRYJg1axb33XffsJMhSZIkSZIaIuJno/2sQ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n",
      "text/plain": [
       "<Figure size 1296x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.feature_selection import SelectKBest, f_classif\n",
    "\n",
    "selector = SelectKBest(f_classif, k=5)\n",
    "selector.fit(data_train[predictors], data_train['happiness'])\n",
    "scores = -np.log(selector.pvalues_)\n",
    "\n",
    "plt.figure(figsize=(18,5))\n",
    "plt.bar(range(len(predictors)), scores)\n",
    "plt.xticks(range(len(predictors)), predictors, rotation='60')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 线性回归"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.61"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LinearRegression \n",
    "\n",
    "lr = LinearRegression()\n",
    "lr.fit(data_train[predictors][:6000], data_train['happiness'][:6000])\n",
    "lr_predictions = lr.predict(data_train[predictors][6000:])\n",
    "lr_predictions\n",
    "\n",
    "sum(np.around(lr_predictions) == data_train['happiness'][6000:])/len(lr_predictions)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 线性回归交叉验证"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [],
   "source": [
    "alg = LinearRegression()\n",
    "kf = KFold(data_train.shape[0], shuffle=False, random_state=1)\n",
    "\n",
    "predictions = []\n",
    "for train, test in kf:\n",
    "    train_predictors = data_train[predictors].iloc[train, :]\n",
    "    train_target = data_train['happiness'].iloc[train]\n",
    "    alg.fit(train_predictors, train_target)\n",
    "    test_predictions = alg.predict(data_train[predictors].iloc[test, :])\n",
    "    predictions.append(test_predictions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.586125"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "predictions = np.concatenate(predictions)\n",
    "sum(np.around(predictions) == data_train['happiness']) / len(data_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>county</th>\n",
       "      <th>gender</th>\n",
       "      <th>birth</th>\n",
       "      <th>nationality</th>\n",
       "      <th>religion</th>\n",
       "      <th>religion_freq</th>\n",
       "      <th>...</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>house</th>\n",
       "      <th>car</th>\n",
       "      <th>marital</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>view</th>\n",
       "      <th>inc_ability</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>2.968000e+03</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "      <td>2968.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>9484.500000</td>\n",
       "      <td>1.422507</td>\n",
       "      <td>15.295485</td>\n",
       "      <td>42.943059</td>\n",
       "      <td>71.242588</td>\n",
       "      <td>1.537062</td>\n",
       "      <td>1964.320081</td>\n",
       "      <td>1.350404</td>\n",
       "      <td>0.772574</td>\n",
       "      <td>1.434636</td>\n",
       "      <td>...</td>\n",
       "      <td>6.244181e+04</td>\n",
       "      <td>2.879717</td>\n",
       "      <td>2.574124</td>\n",
       "      <td>1.081199</td>\n",
       "      <td>1.820081</td>\n",
       "      <td>3.263140</td>\n",
       "      <td>2.229111</td>\n",
       "      <td>1.714286</td>\n",
       "      <td>3.253706</td>\n",
       "      <td>1.089286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>856.932125</td>\n",
       "      <td>0.494042</td>\n",
       "      <td>8.906772</td>\n",
       "      <td>27.148988</td>\n",
       "      <td>38.513031</td>\n",
       "      <td>0.498709</td>\n",
       "      <td>17.044203</td>\n",
       "      <td>1.401234</td>\n",
       "      <td>1.047810</td>\n",
       "      <td>1.430248</td>\n",
       "      <td>...</td>\n",
       "      <td>2.627339e+05</td>\n",
       "      <td>1.458799</td>\n",
       "      <td>1.094105</td>\n",
       "      <td>1.910487</td>\n",
       "      <td>0.488466</td>\n",
       "      <td>1.455495</td>\n",
       "      <td>0.931457</td>\n",
       "      <td>0.844442</td>\n",
       "      <td>2.187685</td>\n",
       "      <td>3.419612</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>8001.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1920.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>8742.750000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>40.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1952.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>1.200000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>9484.500000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>42.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1965.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>3.985000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>10226.250000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>66.000000</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1977.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>7.000000e+04</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>10968.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>134.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1997.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>9.924000e+06</td>\n",
       "      <td>11.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>96.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>4.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8 rows × 40 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                 id  survey_type     province         city       county  \\\n",
       "count   2968.000000  2968.000000  2968.000000  2968.000000  2968.000000   \n",
       "mean    9484.500000     1.422507    15.295485    42.943059    71.242588   \n",
       "std      856.932125     0.494042     8.906772    27.148988    38.513031   \n",
       "min     8001.000000     1.000000     1.000000     1.000000     1.000000   \n",
       "25%     8742.750000     1.000000     7.000000    18.000000    40.000000   \n",
       "50%     9484.500000     1.000000    15.000000    42.000000    73.000000   \n",
       "75%    10226.250000     2.000000    22.000000    66.000000   105.000000   \n",
       "max    10968.000000     2.000000    31.000000    89.000000   134.000000   \n",
       "\n",
       "            gender        birth  nationality     religion  religion_freq  \\\n",
       "count  2968.000000  2968.000000  2968.000000  2968.000000    2968.000000   \n",
       "mean      1.537062  1964.320081     1.350404     0.772574       1.434636   \n",
       "std       0.498709    17.044203     1.401234     1.047810       1.430248   \n",
       "min       1.000000  1920.000000    -8.000000    -8.000000      -8.000000   \n",
       "25%       1.000000  1952.000000     1.000000     1.000000       1.000000   \n",
       "50%       2.000000  1965.000000     1.000000     1.000000       1.000000   \n",
       "75%       2.000000  1977.000000     1.000000     1.000000       1.000000   \n",
       "max       2.000000  1997.000000     8.000000     1.000000       9.000000   \n",
       "\n",
       "          ...       family_income     family_m  family_status        house  \\\n",
       "count     ...        2.968000e+03  2968.000000    2968.000000  2968.000000   \n",
       "mean      ...        6.244181e+04     2.879717       2.574124     1.081199   \n",
       "std       ...        2.627339e+05     1.458799       1.094105     1.910487   \n",
       "min       ...       -3.000000e+00    -3.000000      -8.000000    -3.000000   \n",
       "25%       ...        1.200000e+04     2.000000       2.000000     1.000000   \n",
       "50%       ...        3.985000e+04     3.000000       3.000000     1.000000   \n",
       "75%       ...        7.000000e+04     4.000000       3.000000     1.000000   \n",
       "max       ...        9.924000e+06    11.000000       5.000000    96.000000   \n",
       "\n",
       "               car      marital  status_peer  status_3_before         view  \\\n",
       "count  2968.000000  2968.000000  2968.000000      2968.000000  2968.000000   \n",
       "mean      1.820081     3.263140     2.229111         1.714286     3.253706   \n",
       "std       0.488466     1.455495     0.931457         0.844442     2.187685   \n",
       "min      -8.000000     1.000000    -8.000000        -8.000000    -8.000000   \n",
       "25%       2.000000     3.000000     2.000000         1.000000     3.000000   \n",
       "50%       2.000000     3.000000     2.000000         2.000000     4.000000   \n",
       "75%       2.000000     3.000000     3.000000         2.000000     4.000000   \n",
       "max       2.000000     7.000000     3.000000         3.000000     5.000000   \n",
       "\n",
       "       inc_ability  \n",
       "count  2968.000000  \n",
       "mean      1.089286  \n",
       "std       3.419612  \n",
       "min      -8.000000  \n",
       "25%       2.000000  \n",
       "50%       2.000000  \n",
       "75%       3.000000  \n",
       "max       4.000000  \n",
       "\n",
       "[8 rows x 40 columns]"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_test = pd.read_csv('happiness_test_abbr.csv')\n",
    "data_test.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "# data_test.loc[data_test['happiness'] <0 , 'happiness'] = data_test['happiness'].median()\n",
    "data_test.loc[data_test['inc_ability'] <0 , 'inc_ability'] = data_test['inc_ability'].median()\n",
    "\n",
    "data_test.loc[data_test['view'] <0 , 'view'] = data_test['view'].median()\n",
    "\n",
    "data_test.loc[data_test['status_peer'] < 0, 'status_peer'] = 3\n",
    "# data_test.groupby(['status_peer', 'happiness'])['happiness'].count()\n",
    "\n",
    "data_test.loc[data_test['status_3_before'] <0 , 'status_3_before'] = 3\n",
    "\n",
    "data_test.loc[data_test['car'] <0, 'car'] = 1 \n",
    "\n",
    "data_test.loc[data_test['house'] <0, 'house'] = data_test['house'].median()\n",
    "\n",
    "data_test['family_income'].value_counts()\n",
    "arr = pd.cut(data_test['family_income'], [-10,1000, 3000, 6000, 10000, 15000, 20000, 30000, 50000, 100000, 1000000, 1000000000], \n",
    "             labels=[1,2,3,4,5,6,7,8,9,10,11])\n",
    "data_test['family_income_10'] = arr\n",
    "\n",
    "data_test.loc[data_test['class'] == -8, 'class'] = data_test['class'].median()\n",
    "\n",
    "data_test.loc[data_test['equity'] == -8, 'equity'] = data_test['equity'].median()\n",
    "\n",
    "data_test.loc[data_test['learn'] == -8, 'learn'] = data_test['learn'].median()\n",
    "\n",
    "data_test.loc[data_test['relax'] == -8, 'relax'] = data_test['relax'].median()\n",
    "\n",
    "data_test.loc[data_test['socialize'] == -8, 'socialize'] = data_test['socialize'].median()\n",
    "\n",
    "data_test.loc[data_test['depression'] == -8, 'depression'] = data_test['depression'].median()\n",
    "\n",
    "data_test.loc[data_test['health'] == -8, 'health'] = data_test['health'].median()\n",
    "\n",
    "data_test.loc[data_test['health_problem'] == -8, 'health_problem'] = data_test['health_problem'].median()\n",
    "\n",
    "arr = pd.cut(data_test['weight_jin'], [0,100,110,120,130,140,150,160,180,200,300],\n",
    "            labels=[1,2,3,4,5,6,7,8,9,10])\n",
    "# arr.value_counts()\n",
    "data_test['weight_jin_10'] = arr\n",
    "\n",
    "arr = pd.cut(data_test['height_cm'], [-100,120,140,150,160,165,170,175,180,300],\n",
    "            labels=[1,2,3,4,5,6,7,8,9])\n",
    "# arr.value_counts()\n",
    "data_test['height_cm_10'] = arr\n",
    "\n",
    "# data_test['floor_area'].value_counts()\n",
    "arr = pd.cut(data_test['floor_area'], [-1000, 10, 30, 50, 80, 100, 150, 200, 500, 1000, 10000],\n",
    "            labels=[1,2,3,4,5,6,7,8,9,10])\n",
    "# arr.value_counts()\n",
    "data_test['floor_area_10'] = arr\n",
    "\n",
    "data_test.loc[data_test['political'] == -8, 'political'] = data_test['political'].median()\n",
    "\n",
    "data_test['income'].value_counts()\n",
    "arr = pd.cut(data_test['income'], [-10,1000, 3000, 6000, 10000, 15000, 20000, 30000, 50000, 100000, 1000000, 10000000], \n",
    "             labels=[1,2,3,4,5,6,7,8,9,10,11], )\n",
    "data_test['income_10'] = arr\n",
    "\n",
    "data_test.loc[data_test['edu']==-8, 'edu'] = data_test['edu'].median()\n",
    "\n",
    "data_test.loc[data_test['religion_freq'] == -8, 'religion_freq'] = 1\n",
    "\n",
    "data_test.loc[data_test['religion'] == -8, 'religion'] = 0\n",
    "\n",
    "data_test.loc[data_test['nationality'] == -8, 'nationality'] = 8\n",
    "\n",
    "# data_test.loc[data_test['happiness'] == -8, 'happiness'] = 1\n",
    "\n",
    "data_test.loc[data_test['family_m'] <0 , 'family_m'] = 1\n",
    "\n",
    "data_test.loc[data_test['family_status'] <0 , 'family_status'] = data_test['family_status'].median()\n",
    "\n",
    "# data_test.describe()\n",
    "# data_test.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_prediction = np.around(rfc.predict(data_test[predictors]))\n",
    "test_prediction\n",
    "\n",
    "submit = pd.read_csv('happiness_submit.csv')\n",
    "submit['happiness'] = test_prediction\n",
    "submit.to_csv('happiness_submit.csv', index=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# xgboost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Voyager\\Anaconda3\\lib\\site-packages\\sklearn\\preprocessing\\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.\n",
      "  if diff:\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.621969696969697"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import xgboost\n",
    "from xgboost import XGBClassifier \n",
    "from sklearn.model_selection import train_test_split \n",
    "from sklearn.metrics import accuracy_score \n",
    "\n",
    "model = XGBClassifier()\n",
    "X = data_train[predictors]\n",
    "Y = data_train['happiness']\n",
    "# 将数据分为训练集和验证集 \n",
    "seed = 7\n",
    "test_size = 0.33\n",
    "x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=test_size, random_state=seed)\n",
    "model = XGBClassifier()\n",
    "model.fit(x_train, y_train)\n",
    "y_pred = model.predict(x_test)\n",
    "predictions = [round(value) for value in y_pred]\n",
    "accuracy = accuracy_score(y_test, predictions)\n",
    "accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [
    {
     "ename": "XGBoostError",
     "evalue": "[18:46:15] C:/Jenkins/workspace/xgboost-win64_release_0.90/src/metric/elementwise_metric.cu:326: Check failed: preds.Size() == info.labels_.Size() (13200 vs. 2640) : label and prediction size not match, hint: use merror or mlogloss for multi-class classification",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mXGBoostError\u001b[0m                              Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-119-6f98614b43c5>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      7\u001b[0m \u001b[0mmodel\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mXGBClassifier\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      8\u001b[0m \u001b[0meval_set\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx_test\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my_test\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 9\u001b[1;33m \u001b[0mmodel\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx_train\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my_train\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mearly_stopping_rounds\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0meval_metric\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m\"logloss\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0meval_set\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0meval_set\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     10\u001b[0m \u001b[0my_pred\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mmodel\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpredict\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx_test\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     11\u001b[0m \u001b[0mpredictions\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mround\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalue\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mvalue\u001b[0m \u001b[1;32min\u001b[0m \u001b[0my_pred\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\xgboost\\sklearn.py\u001b[0m in \u001b[0;36mfit\u001b[1;34m(self, X, y, sample_weight, eval_set, eval_metric, early_stopping_rounds, verbose, xgb_model, sample_weight_eval_set, callbacks)\u001b[0m\n\u001b[0;32m    730\u001b[0m                               \u001b[0mevals_result\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mevals_result\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mobj\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfeval\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mfeval\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    731\u001b[0m                               \u001b[0mverbose_eval\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mverbose\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mxgb_model\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mxgb_model\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 732\u001b[1;33m                               callbacks=callbacks)\n\u001b[0m\u001b[0;32m    733\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    734\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobjective\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mxgb_options\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"objective\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\xgboost\\training.py\u001b[0m in \u001b[0;36mtrain\u001b[1;34m(params, dtrain, num_boost_round, evals, obj, feval, maximize, early_stopping_rounds, evals_result, verbose_eval, xgb_model, callbacks, learning_rates)\u001b[0m\n\u001b[0;32m    214\u001b[0m                            \u001b[0mevals\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mevals\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    215\u001b[0m                            \u001b[0mobj\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfeval\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mfeval\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 216\u001b[1;33m                            xgb_model=xgb_model, callbacks=callbacks)\n\u001b[0m\u001b[0;32m    217\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    218\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\xgboost\\training.py\u001b[0m in \u001b[0;36m_train_internal\u001b[1;34m(params, dtrain, num_boost_round, evals, obj, feval, xgb_model, callbacks)\u001b[0m\n\u001b[0;32m     82\u001b[0m         \u001b[1;31m# check evaluation result.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     83\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mevals\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 84\u001b[1;33m             \u001b[0mbst_eval_set\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mbst\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0meval_set\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mevals\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfeval\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     85\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mbst_eval_set\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mSTRING_TYPES\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     86\u001b[0m                 \u001b[0mmsg\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mbst_eval_set\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\xgboost\\core.py\u001b[0m in \u001b[0;36meval_set\u001b[1;34m(self, evals, iteration, feval)\u001b[0m\n\u001b[0;32m   1170\u001b[0m                                               \u001b[0mdmats\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mevnames\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1171\u001b[0m                                               \u001b[0mc_bst_ulong\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mevals\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1172\u001b[1;33m                                               ctypes.byref(msg)))\n\u001b[0m\u001b[0;32m   1173\u001b[0m         \u001b[0mres\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mmsg\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalue\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1174\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mfeval\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\xgboost\\core.py\u001b[0m in \u001b[0;36m_check_call\u001b[1;34m(ret)\u001b[0m\n\u001b[0;32m    174\u001b[0m     \"\"\"\n\u001b[0;32m    175\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[0mret\u001b[0m \u001b[1;33m!=\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 176\u001b[1;33m         \u001b[1;32mraise\u001b[0m \u001b[0mXGBoostError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpy_str\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0m_LIB\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mXGBGetLastError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    177\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    178\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mXGBoostError\u001b[0m: [18:46:15] C:/Jenkins/workspace/xgboost-win64_release_0.90/src/metric/elementwise_metric.cu:326: Check failed: preds.Size() == info.labels_.Size() (13200 vs. 2640) : label and prediction size not match, hint: use merror or mlogloss for multi-class classification"
     ]
    }
   ],
   "source": [
    "X = data_train[predictors]\n",
    "Y = data_train['happiness']\n",
    "# 将数据分为训练集和验证集 \n",
    "seed = 7\n",
    "test_size = 0.33\n",
    "x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=test_size, random_state=seed)\n",
    "model = XGBClassifier()\n",
    "eval_set = [(x_test, y_test)]\n",
    "model.fit(x_train, y_train, early_stopping_rounds=10, eval_metric=\"logloss\", eval_set=eval_set, verbose=True)\n",
    "y_pred = model.predict(x_test)\n",
    "predictions = [round(value) for value in y_pred]\n",
    "accuracy = accuracy_score(y_test, predictions)\n",
    "accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 训练模型\n",
    "param = {}"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
